<%@ Application Language="VB" %>
<%@ Import Namespace="System.Threading" %>
<%@ Import Namespace="System.Globalization" %>

<script runat="server">

	Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)
    
		' Code that runs on application startup
		If Roles.Enabled Then
            If (Not Roles.RoleExists("GTSAdministrator")) Then
                Roles.CreateRole("GTSAdministrator")
            End If
            
            If (Not Roles.RoleExists("Manager")) Then
                Roles.CreateRole("Manager")
            End If

            If (Not Roles.RoleExists("User")) Then
                Roles.CreateRole("User")
            End If
		End If

	End Sub

	Sub Application_End(ByVal sender As Object, ByVal e As EventArgs)
		
        '  Code that runs on application shutdown
        FormsAuthentication.SignOut()
        
        
	End Sub

	Sub Application_Error(ByVal sender As Object, ByVal e As EventArgs)
		
        ' Code that runs when an unhandled error occurs
        
	End Sub

	Sub Application_BeginRequest(ByVal sender As Object, ByVal e As EventArgs)
	End Sub
    
	Sub Session_Start(ByVal sender As Object, ByVal e As EventArgs)
		
        ' Code that runs when a new session is started
        
	End Sub

	Sub Session_End(ByVal sender As Object, ByVal e As EventArgs)
		
        ' Code that runs when a session ends. 
		' Note: The Session_End event is raised only when the sessionstate mode
		' is set to InProc in the Web.config file. If session mode is set to StateServer 
		' or SQLServer, the event is not raised.

	End Sub

</script>
